<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>文件上传下载</title>
</head>
<body>
<h2>文件上传</h2>
<form method="post" enctype="multipart/form-data" th:action="@{/upload}">
    <input type="file" name="file"/>
    <input type="submit" value="上传"/>
</form>
<p th:text="${message}"></p>
<hr/>
<h2>文件下载</h2>
<form th:action="@{/download}" method="get">
    <input type="text" name="uploadTime" placeholder="格式：yyyyMMdd"/>
    <input type="text" name="file" placeholder="格式：文件.txt"/>
    <input type="submit" value="下载"/>
</form>
<h2>文件信息列表</h2>
<table>
    <thead>
    <tr>
        <th>序列</th>
        <th>名称</th>
        <th>类型</th>
        <th>路径</th>
        <th>创建时间</th>
        <th>修改时间</th>
        <th>备注</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="fileInfo : ${fileInfos}">
        <td th:text="${fileInfo.id}"/>
        <td th:text="${fileInfo.name}"/>
        <td th:text="${fileInfo.type}"/>
        <td th:text="${fileInfo.path}"/>
        <td th:text="${fileInfo.createDate}"/>
        <td th:text="${fileInfo.modifyDate}"/>
        <td th:text="${fileInfo.remark}"/>
    </tr>
    </tbody>
</table>
</body>

<style>
    table {
        border-collapse: collapse; /* 合并单元格边框 */
        border-spacing: 0; /* 单元格间距 */
    }

    td, th {
        border: 1px solid #ccc; /* 单元格边框 */
        padding: 10px; /* 单元格内边距 */
    }
</style>

</html>
